home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / integersizedemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  423 b   |  14 lines

  1. program IntegerSizeDemo;
  2. type
  3.   MyInt  = Integer (42);  { 42 bits, signed }
  4.   MyWord = Word (2);      { 2 bits, unsigned, i.e., 0 .. 3 }
  5.   MyCard = Cardinal (2);  { the same }
  6.  
  7.   HalfInt = Integer (BitSizeOf (Integer) div 2);
  8.     { A signed integer type which is half as big as the normal
  9.       `Integer' type, regardless of how big `Integer' is
  10.       on any platform the program is compiled on. }
  11.  
  12. begin
  13. end.
  14.